diff --git a/plugin/YouPHPFlix2/YouPHPFlix2.php b/plugin/YouPHPFlix2/YouPHPFlix2.php index 17443b65f..a1a3c5644 100644 --- a/plugin/YouPHPFlix2/YouPHPFlix2.php +++ b/plugin/YouPHPFlix2/YouPHPFlix2.php @@ -1,127 +1,134 @@ Help"; return $txt.$help; } public function getName() { return "YouPHPFlix2"; } public function getUUID() { return "e3a568e6-ef61-4dcc-aad0-0109e9be8e36"; } public function getPluginVersion() { return "1.0"; } public function getEmptyDataObject() { global $global; $obj = new stdClass(); $obj->hidePrivateVideos = false; $obj->pageDots = true; $obj->Suggested = true; $obj->SuggestedAutoPlay = true; $obj->PlayList = true; $obj->PlayListAutoPlay = true; $obj->Trending = true; $obj->TrendingAutoPlay = true; $obj->DateAdded = true; $obj->DateAddedAutoPlay = true; $obj->MostPopular = true; $obj->MostPopularAutoPlay = true; $obj->MostWatched = true; $obj->MostWatchedAutoPlay = true; $obj->SortByName = false; $obj->SortByNameAutoPlay = true; $obj->Categories = true; $obj->CategoriesAutoPlay = true; $obj->maxVideos = 20; $obj->BigVideo = true; $obj->RemoveBigVideoDescription = false; $obj->BigVideoPlayIcon = true; $obj->BigVideoMarginBottom = "-350px"; $obj->backgroundRGB = "20,20,20"; $obj->landscapePosters = true; $obj->playVideoOnFullscreen = true; + $obj->playVideoOnFullscreenOnIframe = true; $obj->youtubeModeOnFullscreen = false; $obj->paidOnlyLabelOverPoster = false; $obj->titleLabel = true; $obj->titleLabelOverPoster = false; $obj->titleLabelCSS = ""; return $obj; } public function getHelp(){ if(User::isAdmin()){ return "

YouPHPFlix options (admin)

Option-nameDefaultDescription
DefaultDesigncheckedThe original style, for each category, one row with the newest videos
DateAdded,MostPopular,MostWatched,SortByNamechecked,checked,checked,uncheckedMetacategories
LiteDesignunchecked All categories in one row
separateAudiouncheckedCreate a own row for audio
"; } return ""; } public function getFirstPage(){ global $global; if(!AVideoPlugin::isEnabledByName("CombineSites")){ return $global['systemRootPath'].'plugin/YouPHPFlix2/view/modeFlix.php'; } } public function getHeadCode() { global $global, $isEmbed; $obj = $this->getDataObject(); $baseName = basename($_SERVER["SCRIPT_FILENAME"]); if($baseName == 'channel.php'){ return ""; } $css = ""; //$css .= "theme.".css\" rel=\"stylesheet\" type=\"text/css\"/>"; $css .= ""; if(!empty($obj->youtubeModeOnFullscreen) && canFullScreen()){ $isEmbed = 1; $css .= ''; $css .= ''; $css .= ''; } return $css; } static function getLinkToVideo($videos_id){ $obj = AVideoPlugin::getObjectData("YouPHPFlix2"); $link = Video::getLinkToVideo($videos_id); if(!empty($obj->playVideoOnFullscreen)){ if(!Video::isSerie($videos_id)){ $link = parseVideos($link, 1, 0, 0, 0, 1); } } return $link; } public function getFooterCode() { $obj = $this->getDataObject(); global $global; $js = ''; - if(!empty($obj->playVideoOnFullscreen) && !isSerie()){ - $js = ''; - }else{ - $js = ''; + + if (!empty($obj->playVideoOnFullscreenOnIframe) && !isSerie()) { + $js .= ''; + $js .= ''; + } else + if (!empty($obj->playVideoOnFullscreen) && !isSerie()) { + $js .= ''; + $js .= ''; + } else{ + $js .= ''; } $js .= ''; return $js; } } diff --git a/plugin/YouPHPFlix2/view/js/fullscreen.js b/plugin/YouPHPFlix2/view/js/fullscreen.js index 42796960c..a67fd8142 100644 --- a/plugin/YouPHPFlix2/view/js/fullscreen.js +++ b/plugin/YouPHPFlix2/view/js/fullscreen.js @@ -1,108 +1,116 @@ $(document).ready(function () { - linksToFullscreen('a.canWatchPlayButton'); + transformLinksToEmbed('a.canWatchPlayButton'); $(document).on('keyup', function (evt) { if (evt.keyCode == 27) { closeFlixFullScreen(); } }); }); +function transformLinksToEmbed(selector){ + if(playVideoOnFullscreen === 1 && typeof linksToFullscreen === 'function'){ + linksToFullscreen(selector); + }else if (playVideoOnFullscreen === 2 && typeof linksToEmbed === 'function'){ + linksToEmbed(selector); + } +} + var flixFullScreenActive = false; function flixFullScreen(link, url) { if(flixFullScreenActive){ return false; } flixFullScreenActive = true; setTimeout(function(){flixFullScreenActive=false;}, 500); $('body').addClass('fullScreen'); var divHTML = '
'; divHTML += '
'; divHTML += ''; divHTML += '
'; var div = $(divHTML).append('